<?php
/**
 * Created by PhpStorm.
 * User: zero
 * Date: 2018/6/22
 * Time: 11:23
 */
class Red{
    public  $redis;
    public $count = 0;
    public function __construct()
    {
        $this->redis = new Redis();
        $this->redis->connect('127.0.0.1', 6379);
        $this->redis->set('cat', $this->count++);
    }



    public  function getCache(){

        //return $this->redis->get('cat');
    }


}

$red = new Red();
//print_r($red->getCache());